Methods, devices and systems with improved zone merge operation by operating on a switch basis

ABSTRACT

Methods, devices and systems for improved zone merge operations are disclosed. Two connected switches are arbitrated as an initiator and a receiver. The merge operation is initiated only by the initiator on an initiator/receiver inter-switch link. The initiator may initiate a merge request and the receiver may perform the computation of the difference between the old and the new zone. Either the whole configuration or only the differences are communicated between the switches. The merges may be done on a connected switch basis, not on a connected port basis. Only the principal ports in the principal inter-switch-link perform the merge operation. All the remaining ports, i.e. the non-principal ports, adopt the merge result of the principal ports. The zone information may also be cached on each switch such that merge calculations need not be performed again when a merge operation with the same configuration occurs in the future.

CROSS-REFERENCE TO RELATED APPLICATIONS

This case is related to U.S. patent application Ser. No. 10/988,180,entitled “Methods, Devices and Systems with Improved Zone MergeOperation by Initiator Selection,” by Yi Lin, Eric Warmenhoven, SundarPoudyal and James Hu, filed concurrently herewith and Ser. No.10/988,172, entitled “Methods, Devices and Systems with Improved ZoneMerge Operation by Caching Prior Merge Operation Results,” by Yi Lin,Eric Warmenhoven, James Hu and Sundar Poudyal, filed concurrentlyherewith, both of which are hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to an electronic network and its operation, morespecifically to a zone merge operations within such a network.

2. Description of the Related Art

The Fibre Channel family of standards (developed by the AmericanNational Standards Institute (ANSI)) defines a high speed communicationsinterface for the transfer of large amounts of data between a variety ofhardware systems such as personal computers, workstations, mainframes,supercomputers, storage devices and servers that have Fibre Channelinterfaces. Use of Fibre Channel is proliferating in client/serverapplications which demand high bandwidth and low latency I/O such asmass storage, medical and scientific imaging, multimedia communication,transaction processing, distributed computing and distributed databaseprocessing applications.

A Fibre Channel network may consist one or more fabrics. A fabric is anentity that interconnects various ports attached to it and is capable ofrouting frames using only the D_ID information in an FC-2 frame header.A fabric may have zones to facilitate network management and operation.A zone is a group of zone members, where members of a zone are madeaware of each other, but not made aware of other devices outside thezone. A zone can be defined to exist in one or more zone sets. Each zonehas a zoning configuration, which includes a zone definition and a zoneset state. The zone definition contains parameters that define a zone,including zone name, number of zone members and zone member definitions.The zone member definition contains parameters that define a zone memberincluding the zone member type and zone member information. The zone setstate is the state of a switch zone set (activated or deactivated).

When two fabrics are joined together, i.e. at least one switch in onefabric is connected to at least another switch in the other fabric, ifzoning is present, then the two switches will attempt to merge theirzoning information to ensure the zoning information is consistent acrossthe joined fabric. The performance of the merge operation directlyaffects the processing time needed to allow the whole fabric to returnto stable state as well as the overall performance of the switchesduring the merge operations.

The interface on a switch that connects to another device is a port.There are many different ports depending on the network topology and thetype of devices that they are connecting. The port on a switch thatconnects to a port on another switch is an E_port. A port on a switchthat connects to an end node is an F_port. The current invention isdirected to the merge operation between switches, so only E_ports willbe discussed.

FIG. 1 shows a small part of a Fibre Channel network 100, where a switch102 is connected to another switch 104. SwitchA 102 has a zoneconfiguration 112 cfgA and switchB 104 has a zone configuration 114cfgB. Each switch 102, 104 has a checksum associated with the zoneconfiguration. A zone configuration may have a size between severalkilobytes to many megabytes depending on the switch or fabricconfigurations. In the examples discussed below, a zone configurationoften runs to hundreds of kB. A checksum is typically much smaller,significantly less than 1 kB. A checksum acts as a shorthand oridentifier for a particular configuration. In the same examples, achecksum is 32 bytes.

A merge computation performs a union of the two configurations in:cfgR=cfgA∪cfgB  (1)A simplified merge exchange is illustrated in FIG. 2 between switches102 and 104. It is simplified in that it does not show all thetransactions that may happen when two switches are connected. Forexample, FIG. 2 does not show many merge requests sent from switchB 104to switchA 102; it does not show any possible Rejects because of busyconditions; and it does not show any possible retries as well.

A merge exchange includes several steps. Using FIG. 2 as a simplifiedexample, the merge exchange may occur as follows. Assuming switchA 102initiates the merge operation, switchA 102 sends a checksum request toswitchB 104 (Req1) and switchB 104 sends a response back, which is itsown checksum (Res1:ACC). SwitchA 102 compares the checksum received fromswitchB 104 with its own. If they are different, switchA 102 sends outan MR request with cfgA (Req2: MERGE). SwitchB 104 responds with cfgB inacknowledgement (Res2:ACC). SwitchB 104 computes ΔB cfgMerge(cfgB, cfgA)and installs the entries of ΔB. Then switchB 104 has a new configurationcfgR with a new checksum associated with the new configuration cfgR.When switchA 102 gets the response of cfgB, it also does a mergecomputation ΔA=cfgMerge(cfgA, cfgB) and installs the entries of ΔA.SwitchA 102 now has cfgR. After this, the merge initiated from switchA102 finishes. SwitchB 104 also attempts or initiates a merge by sendingchecksum request (Req3: CHECK). SwitchA 102 responds back (Res3:ACC),which is switchA's 102 new checksum associated with the new cfgR. SinceswitchB 104 has the same cfgR after the merge operation which wasinitiated by switchA 102 and the same checksum, the checksums match. Sothe merge initiated from switchB 104 finishes.

As will be discussed below, in the above merge operation, there are manyduplicate operations and unnecessary data transmissions in the network.It is desirable to perform the merge operation more efficiently.

When a switch 102 is connected to a network of several switches 104,106, 108 and 109 as shown in FIG. 3 or FIG. 4, the merge operation maybe more complicated and time consuming. In this case, switchA 102 andswitchB 104 merge first in the same way as shown in FIG. 1 and discussedabove. SwitchA 102 does cfgMerge (cfgA, cfgB), and switchB 104 doescfgMerge (cfgB, cfgA). Both switches have cfgR as a result. SwitchB 104broadcasts this to switchC 106. Since the configuration on switchB 104changes, there will be a merge operation between switchB 104 and switchC106. SwitchB 104 does cfgMerge (cfgC, cfgB) and switchC 106 doescfgMerge (cfgB, cfgC). The same chain of events will propagate furtherdown the path until every pair of connected switches have the sameconfiguration. If one counts the merge exchanges, one can find threemerge exchanges, and a total of six merge computations when switchA 102is connected to the fabric comprising switchB 104, switchC 106 anddevice DeviceD 108, in the simple example shown in FIG. 4. There aremore merge exchanges and merge computations for a more complicatedconfiguration such as shown in FIG. 3, because of more connected pairsof switches. However, as will be discussed below, many of the operationsare unnecessary. It is desirable to improve the merge operation.

Merge operations are typically performed on a connected port basis. Ifmore than one pair of ports on two switches is connected, as shown inFIG. 5, each pair of ports will perform merge operations, even thoughthe merges are the same for each pair. FIG. 5 shows an example wheredifferent numbers of pairs of ports are connected between switcheswithin a fabric. In the example shown in FIG. 5, switchA 102 and switchB104 have four (4) pairs of ports connected, i.e. links between ports 121and 131, ports 123 and 133, ports 125 and 135 and ports 127 and 137.SwitchB 104 and switchC 106 have one pair of ports 136 and 144 linked.SwitchC 106 and deviceD 108 have two pairs of ports linked, ports 156and 145, and ports 158 and 147. In FIG. 5, a few details of the networkdeviceD 108 and switchC 106 are shown. The network deviceD 108 has anetwork interface 156 containing ports 152 and 154 which are capable toconnect to ports on other network devices, such as switchC 106. Withinthe deviceD 108, there is a control module 158 which is coupled to thenetwork interface and controls the operation of the deviceD 108. Thecontrol module 158 is also coupled to a memory module 157 which storesoperation data or device information, such as configuration data 159.DeviceD can be any entity within a network. Similarly, switchC may haveseveral ports 141-148, a control module and a memory module. In thefabric shown in FIG. 5, some of the pairs may be trunked, i.e. they actas a single logical link, e.g. links 156-145 and 158-147 may be trunkedas if they were a single link. When port 121 and port 131 are connected,both of them initiate merge operations as discussed above. When theother pairs of ports are connected between switchA 102 and switchB 104,when the links are not trunked, each of them will perform a mergeoperation again, even though the merge results are already known fromthe earlier merge between port 121 and port 131. Therefore, it isdesirable to have a method or devices that can avoid the wastefuloperations.

When two switches are connected, both switches will initiate a mergeoperation. They are likely to initiate at approximately the same time.The result is that both merge requests will be rejected with a reason ofLOGICAL_BUSY. If not treated specially, both switches would wait for theother side to initiate a merge, thus missing the initial MERGE. Thedefault waiting time is different for different switches. So after somewaiting time, one switch will try again to initiate a merge request andnot getting a rejection. It is desirable to avoid the waiting time.

As discussed above, the current merge operation may have redundant mergecomputations, redundant merge exchanges, unnecessary merge retriesacross the fabric and extra waiting time. These inefficiencies make themerge operation prolonged and the fabric wait a longer time to bestable. It is desirable to have a method, a device and a system thatmake merge operations more efficient.

BRIEF SUMMARY OF THE INVENTION

According the embodiments of the present invention, the zone mergeoperation is improved.

In one embodiment, a port-based merge is changed to a switch-basedmerge. Only one merge is performed per connected-switch pair, which canreduce the redundant merges among ports connected to the same remoteswitch.

In another embodiment, two switches to be merged are distinguished as amerge initiator and a merge receiver by a switch specific identifier,for example by WWN arbitration. Only a merge initiator can initiate amerge operation and directs the merge calculation. This reduces thenumber of merge operations. This also avoids the waiting time caused bythe conflicts between the two connected switches both trying to performa merge operation.

In another embodiment, one switch transmits its whole configuration tothe other switch. The other switch only transmits a configurationdifference, or partial configuration, such that the overhead traffic oftransmitting zoning configurations is reduced.

In a further embodiment, the checksums involved in past merge operationsare cached in each switch. When a new merge operation is requested, theswitch can check all the prior checksums. If the requesting checksum wasused before, then the existing config will be the resulting config afterthe requested merge operation. Therefore, config will be used directlywithout the unnecessary merge calculation.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

A better understanding of the invention can be had when the followingdetailed description of the preferred embodiments is considered inconjunction with the following drawings, in which:

FIG. 1 depicts a two switch merge scenario in a network.

FIG. 2 depicts merge exchanges in the two switch scenario as shown inFIG. 1.

FIG. 3 depicts a new switch merging into a group of connected switches.

FIG. 4 depicts a special topology of connected switches or other networkdevices, i.e. chained connection.

FIG. 5 depicts more details regarding port connections in amultiple-port connection network as shown in FIG. 4.

FIGS. 6A, 6B and 6C depict merge exchanges in the scenario as shown inFIG. 1 according to one embodiment of the current invention.

FIG. 7 is a high level state diagram of an embodiment of the currentinvention.

FIG. 8 is a state diagram of a principal initiator.

FIG. 9 is a state diagram of a non principal initiator.

FIG. 10 is a state diagram of a receiver port.

DETAILED DESCRIPTION OF THE INVENTION

According to the embodiments of the current invention, many current andpotential deficiencies in the merge operation are discovered, theirsources identified and improvements made to eliminate such deficiencies.

According to one embodiment of the current invention, an enhanced zoningmerge is implemented using an event driven state machine. A merge eventdispatcher may be used. The merge event dispatcher listens to mergerelated events. On receiving a merge related event, a correspondingoperation is initiated. The dispatcher first performs pre-dispatchchecking to determine if the event needs to be handled asynchronously.If not, event is handled in context of the caller. Asynchronous eventsare scheduled for later dispatch. As long as there is a pending event onany E_port, the dispatcher feeds it to the port state-machine to advanceit to a next state. When one port is DONE, it moves to the next one withpending events. If all ports are in DONE state merge is finished.

During a merge, communication between two switches is based on a “newmerge exchanges” format. The new merge exchange is done by using portstate-machine transition logic. Each port will be either an initiator ora receiver based on initiator/receiver arbitration. If a new zoningconfiguration is generated during the merge, the event dispatchergenerates an event on the other ports (BROADCAST). The portstate-machine may be expanded to include logic to handle a backwardcompatible mode or an interop mode, if desired.

The merger event dispatcher is responsible for: pre-dispatch checkingand synchronous event handling; event dispatching; and driving portstate-machine transitions.

Pre-dispatch checking: Zoning only handles one merge on one port at anytime. Some merge requests can be rejected immediately in context of thesource of the event. Pre-dispatch checking identifies events that couldbe handled synchronously. For example, if the dispatcher receives amerge request, pre-dispatch checks to determine if merge is already inprogress. If so and the current “in process” port is same as the portassociated with the incoming event, the dispatcher handles this eventdirectly by rejecting the request with LOGICAL_BUSY.

Event dispatching: The dispatcher may dispatch the event to one port, ora group of ports. During dispatch, events are mapped to unified mergeevent types. The real dispatch process is simply associating an eventwith a corresponding port. For any port, only a pending event ispossible. Dispatching replaces a current event at the port with a laterone. If more than one event is pending, then pending events are put in aqueue.

Driving the port state machine transition: The dispatcher is alsoresponsible for feeding events into the port state-machine. Wheneverthere is a pending event on a port, the dispatcher feeds it into theport state-machine by a corresponding transition routine. When a port isdone with the merge, and there are no pending events, the dispatchermoves to the next port. After all ports are processed, the dispatcherwill be in idle mode until the next event.

According to an embodiment of the current invention, when an E_portcomes ONLINE after it is connected to another port on another switch, itwill be initialized as either the merge initiator or receiver. The rolewill be determined using a unique identifier or feature of the port. Inone implementation, the WWN (World-Wide Name) of the switch is used asthe unique identifier because it is unique in the network for eachswitch and convenient to use. Based on the WWN of a switch, anarbitrator determines a winner of the arbitration, which becomes aninitiator and the loser is a receiver. By identifying two differentroles for each switch in a connection, and allowing only the initiatorto perform the merge operation, the redundant merge operation andconflicts are avoided.

According to this embodiment of the current invention, it is immaterialhow the arbitrator assigns the two different initiator/receiver roles,or which role performs the whole or parts of the merge operation, aslong as only one merge operation is performed between the two switches.One convenient arbitration rule is that the switch with the lower WWNbecomes the arbitration winner, i.e. the initiator.

Refer back to the fabric shown in FIG. 1. Assuming switchA 102 wins theinitiator/receiver arbitration, then switchA 102, which is now theinitiator, can initiate the merge operation. SwitchB 104, which is now areceiver, cannot initiate the merge operation. Therefore, there can beno conflict caused by switchA 102 and switchB 104 initiating mergeoperation at the same time. The waiting time is thus eliminated.According to this embodiment, half of the merge operations and thedefaulting waiting time are eliminated.

Refer to FIG. 6A. As an example, switchA 102 may initiate the mergeoperation by sending its checksum to switchB 104. SwitchB 104 comparesthe checksum from switchA 102 with its own. If they match, then the twoswitches have the same zone configurations and no merge operation isnecessary. SwitchB 104 may respond with an ACCDONE to indicate the endof the merge.

If the checksums do not match, then switchB 104 responds with itsconfiguration cfgB and the checksum. SwitchA 102 performs the mergecalculation to get the resulting configuration cfgR and a new checksumfor cfgR, and transmits the result to switchB 104. SwitchB 104 can theninstall the new configuration. SwitchB 104 now has the new configurationcfgR and the new checksum.

In another embodiment as shown in FIG. 6C, if the checksums do notmatch, then switchB 104 responds with ACCMERGE, which informs switchA102 that a merge calculation is necessary. SwitchA 102 sends itsconfiguration cfgA and the checksum to switchB with request MERGE.SwitchB 104 performs the merge calculation to get the resultingconfiguration cfgR and a new checksum for cfgR. SwitchB 104 now has anew configuration cfgR. SwitchB 104 transmits the result to switchA 102in ACCRESULT. SwitchA 102 can then install the new configuration. Themerger operation ends with both switchA 102 and switchB 104 having thenew configuration cfgR and the new checksum.

Referring to FIGS. 3 and 4, similar savings can be achieved according tothe embodiment of the current invention. As discussed earlier, for thefabric shown in FIG. 4, there are three merge exchanges between switchA102 and switchB 104, switchB 104 and switchC 106, switchC 106 anddeviceD 108, and a total of six merge calculations using the prior artprocedure. According to the embodiment, only three merge calculationsare performed, a reduction of 50%. As will be discussed below, accordingto another embodiment, the number of calculations may be furtherreduced.

Referring back to the situation shown in FIGS. 1 and 2, the mergecomputation performs union of the two configurations resulting in cfgR.To achieve a faster merged database installation, each switch usuallycalculates only ΔA=cfgMerge(cfgA,cfgB), i.e. elements in cfgB not incfgA. Similarly, the neighbor, or the other switch, calculatesΔB=cfgMerge(cfgB, cfgA).Hence, cfgR=cfgA∪ΔA=cfgB∪ΔB  (2)

Thus, with the prior art implementation, redundant computation existsacross the fabric. Take the two switches with a single ISL scenario asan example, as illustrated in FIG. 1. Assume the cfgA on SwitchA 102 andcfgB on switchB 104 are compatible. Assume they are mid-sizedconfigurations: cfgA is 40 k, cfgB is 50 k, and the merge result cfgR is60 k.

As observed by the inventors in the current invention, calculations ofcfgMerge(cfgA,cfgB) and cfgMerge(cfgB,cfgA) are identical procedurally.Both calculations need to traverse the two configurations and find thedifference. According to an embodiment of the current invention, deltaAand deltaB are calculated in one shot. In this embodiment, switchA 102initiates merge operation. SwitchB 104 responds with a NoMatch signalindicating a merge is necessary. SwitchA 102 sends its configurationcfgA to switchB 104. SwitchB 104 performs the merge calculation. Aftermerge happens on switchB 104, switchB 104 responds with deltaA directly,rather than the whole resulting configuration cfgR. After receiving andinstalling deltaA, switchA 102 has the resulting configuration cfgR.Here, the computation is performed only on switchB 104. Also less FibreChannel frame traffic is sent, because only the difference is sent back.

In this particular example, using the prior art procedure, the generatedtraffic is roughly 90 k, i.e. 40 k (cfgA from switchA to switchB)+50 k(cfgB from switchB to switchA) with cfgMerge. According to theembodiment of the current invention, with cfgMergeNew, the traffic willbe only 60 k, i.e. 40 k (cfgA from switchA to switchB)+(60 k−40 k)(deltaA from switchB to switchA). So in this example, the amount ofnetwork traffic is reduced by 30 k. The more the overlap between the twoconfigurations, the more the savings.

As will be discussed below, in another embodiment, both deltaA anddeltaB are transmitted to the other switch. In that case, the trafficwill be only 70 k, i.e. 40 k (cfgA from switchA to switchB)+(60 k−40 k)(deltaA from switchB to switchA)+(60 k−50 k) (deltaB from switchB toswitchA). So in this example, the amount of network traffic is reducedby 20 k. But more savings will be realized in multiple switch networksas will be explained.

According to one embodiment of the current invention, when two switchesare linked with multiple Inter-Switch Links (ISLs), only one link needsto be involved in the merge. This way, the merge is done on per-switchbasis, rather than per-port basis and the number of merge operations isreduced, sometimes dramatically depending on the number of ISLs. AllE_ports are associated with corresponding neighbor switches. Switchesmay be identified by their World Wide Numbers (WWN). For every neighbor,a principal E_port is selected. In one implementation, the selection maybe done during E_port ONLINE. A list of all E_ports may be maintained,such that each E_port has a sequence or priority to become a principalE_port. If an E_port is the first one associated a particular WWN, it isselected as the principal E_port. Only the principal E_port participatesin a merge operation. At the end of the merge operation of the principalE_port on the initiator, the status is updated accordingly for all nonprincipal E_ports. Any requests received by non-principal ports will berejected with LOGICAL_BUSY. If the principal E_port goes down, the nextone in the priority list may be designated as the new principal.

With switch-based merge operations, only one merge operation isperformed even if there are multiple ISLs between two switches. In theexample shown in FIG. 5, according to this embodiment of the currentinvention, there will be only one merge operation among the four ISLsbetween the switchA 102 and switchB 104, rather than eight mergeoperations as in the prior art.

Still referring to the example shown in FIG. 4, it is observed that:

from cfgR=cfgA∪cfgB,

we also have cfgR=cfgR∪cfgB or cfgR=cfgR∪cfgA

which means, we could predict the merge result of cfgB (or cfgA) andcfgR if cfgR comes from the merge of cfgA and cfgB. Caching last orprior merge results may prevent unnecessary merge exchanges. WhenswitchA 102 joins the fabric, switchB 104 performs the initial merge;caches the merge operation results, and responds to switchA 102. SwitchA102 may cache or store cfgR (this is always stored in switchA 102,because it is the current configuration of switchA 102 after the merge),deltaA, deltaB, and the checksums associated with cfgA, cfgB and cfgR.SwitchB 104 may cache the same information. Once the merge operation iscomplete, the prior configurations of switchA 102 and switchB 104, i.e.cfgA and cfgB are no longer needed. If they are ever needed, they can bereconstructed from deltaA, deltaB and cfgR. To save storage space, theyare stored separately as individual configurations.

Then switchB 104 sends a cache enhanced checksum request to switchC.From that, switchC 106 knows its configuration, i.e. cfgB, was involvedin a previous merge, and switchB 104 has the results for it. So switchC106 directly asks switchB 104 to send the merge results, i.e. deltaA,deltaB. Hence merge exchanges between switchB 104 and switchC 106 areavoided and switchC gets the results directly. The same thing happensbetween switchC 106 and deviceD 108. During the whole merge process,only one full merge exchange (between switchA and switchB) is performed.At same time, the merge computation is performed only once in entirefabric.

If a new switch with cfgC joins the fabric, by comparing the checksumassociated with cfgC with the checksums associated with cfgA, cfgB andcfgR, one could know if a fresh merge is needed. If the checksum is thesame as that associated with cfgA or cfgB, it means that cfgC wasinvolved in a previous merge computation. The merge results of cfgC andcfgR will still be the same as cfgR. In this case, the new switch needsto get the corresponding delta (either deltaA or deltaB) to get thefabric's zoning configuration. If the checksum of cfgC matches that ofcfgR, then no merge and zoning installation are needed. If cfgC does notmatch the cached configurations, then a new merge will be performed andthe result will update the current cached contents.

Matching checksums of configurations may provide further optimization.In this case, we may cache only: deltaA, deltaB, checksumA, checksumB,checksumR in order to know if a new merge is needed when a switch joinsthe fabric.

This embodiment may be further illustrated using a numeric example. Ifwe assume cfgA, cfgB and cfgR are mid-sized zoning configurations e.g.:40 k, 50 k and 60 k, the network traffic without caching would be: 40 k(switchA send to switchB cfgA)+50 k (switchB send to switchA)+60 k(switchB send cfgR to switchC)+50 k (switchC send to switchB cfgB)+60 k(switchC send cfgR to deviceD)+50 k (deviceD send cfgB back toswitchC)=310 k;

The network traffic with caching according to an embodiment of thecurrent invention would be: 40 k (switchA sends to switchB cfgA)+(20k+10 k) (two deltas in the results)+2×(20 k+10 k) (same results passedfrom switchB to switchC and from switchC to deviceD)=130 k. This is morethan a 50% of reduction in network traffic. Since in most networkscenarios, the differences in zone configurations between switches arerelatively small, the savings in network traffic are typically muchgreater than shown in the numeric examples.

To further improve the embodiments described above, a new merge exchangeinvolving cache sensitive requests and responses may be employed. Onemerge exchange could include multiple requests and responses.

In new merge exchanges, the initiator sends merge requests. Requests canbe of type: CHECKSUM, TAKECACHEDRESULT or MERGE. The following tabledescribes these requests in detail. Not all components of the listedrequest content are always included in a particular request. Thecomponents included in a request depend on the embodiment implemented.For example, the LocalCachedA and LocalCachedB components are onlyincluded if the configuration caching as described above is implemented.DeltaA and DeltaB in the TAKECACHEDRESULT may be included if the partialdata transmission is implemented.

TABLE 1 Merge2 Request List Name Description Contents Req1: CHECKSUMMerge checksum requests Version Number with cache information itCapability has. It is compatible with LocalCurrentChecksum: CHECKcommand for Checksum of merge legacy switches. Sender computation resultor sends cached checksums checksum of current of all elements involvedin result if no cache. the last logical merge. LocalCachedA: Receiverwill match its checksum of cached checksum with the cached cfgA in lastmerge. checksum and respond to LocalCachedB: indicate the next step inchecksum of cached merge. cfgB in last merge. TAKECACHEDRESULT Requestto let Version receiver take cached ChecksumA merge results directly.ChecksumB DeltaA DeltaB MERGE Merge request, Version sender sends itsLocal Config current config

The response in MERGE2 is multifunctional. Besides normalacknowledgement, the merger response contains control data instructinghow further merge steps are to occur. The Responder performs real themerge computation. Response codes are illustrated in Table 2.

TABLE 2 MERGE2 Response List Name Description REJBUSY Reject with reasonbusy. REJCANTPERFORM Reject with reason “can't perform requestedoperation” ACCDONE Acknowledgement indicating end of merge session.ACCMERGE Acknowledgement indicating of need continue merge with (bysending embedded checksum). ACCCACHED Acknowledgement indicatingchecksum match. ACCRESULT Acknowledgement containing resultingconfiguration. ACCSEGMENT Acknowledgement requesting segmenting port(conflict).

Referring to FIGS. 6A, 6B and 6C, the merge operation according thevarious embodiments of the current invention may be described in thefollowing basic steps:

First Checksum Exchange:

A merge exchange is initiated by one of the two connecting E_ports (i.e.the merge initiator) sending the CHECK request. The receiver matches thechecksum with its own checksum and sends acknowledgement to theinitiator. If the receiver matches the remote current checksum, it sendsACCDONE indicating no further merge is needed, as shown in FIG. 6A. Ifcached checksum matches, it sends back ACCCACHED, see FIG. 6B. If nomatch is found, ACCMERGE is sent, see FIG. 6C. Receiver then waits forinitiator to send its config, as in FIG. 6C.

TAKECACHED Exchange:

If the initiator gets an ACCCACHED response, it sends TAKECACHED. Thereceiver takes the cached merge result, installs the new configurationand finishes the merge by sending ACCDONE response, as shown in FIG. 6B.

Logical Merge:

On getting an ACCMERGE response the initiator sends MERGE request. Thereceiver begins the logical merge of the two configs. If they are notcompatible, it segments the linked E_ports and sends ACCSEGMENT.Otherwise it updates its own cache and sends ACCRESULT as shown in FIG.6C. The initiator will take the merge results and the merge session isover. It also updates its cache. Both switches will post BROADCASTevents on their other principal E_ports.

When all E_ports reach the merge-done state, the merge is considered tobe over.

As illustrated by FIGS. 6A, 6B and 6C, in the merge operation accordingto embodiments of the current invention, many redundant steps oroperations are eliminated from the prior art merge process. Only theinitiator of the two connected switch pair initiates the mergeoperation. The receiver does not initiate the merge operation. Whenthere is a cached configuration available on the receiver/initiator,then only the cached configuration is transmitted, not the wholeconfiguration.

The various embodiments and their operations may be explained usingstate diagrams of the event driven state machines. A high level statemachine is shown in FIG. 7. The associated states and events that thatcan cause transitions between various states are shown in Tables 3 and4. Referring to FIG. 7, an E_port is in a M0 state when it goes online,and it changes to M5 when it goes offline. While doing a merge, if theport is arbitration winner, it will switch to initiator (principal ornon-principal), otherwise it will be a receiver (composite state M3). Ifa port is the first one of the joining neighbor switch and its role isinitiator, the composite state is M1. Otherwise the port becomes anon-principal initiator (M2). When the E_port finishes the merge, itwill transit to M4 waiting for further events. On receiving a furtherevent, it will transition through appropriate states once again.

TABLE 3 High Level States Label State Name Description M0 INITIALIZEDBefore E_port online. M1 IPRINCIPAL Composite state: E_port as principalinitiator M2 INONPRINCIPAL Composite state: E_port as non-principalinitiator M3 RECEIVER Composite state: E_port as receiver M4 FINISHEDMerge finished on this port. M5 UNINITIALIZED After E_port offline orbefore E_port online.

TABLE 4 High Level State Transitions Transition (Start:End) Events(including conditions) M0:M1 EvtMStart - start merge, port is anarbitration winner, and it is the only one connected with that neighborswitch. M0:M2 EvtMStart - port is anarbitration winner but not the firstone connected with that neighbor switch. M0:M3 EvtMStart - port is anarbitration loser. M1:M3 EvtRejBusyReceived - port changes to receiverrole. M2:M1 EvtPrincipal - current principal merge initiator wentOFFLINE, next one associated with neighbor becomes principal initiator.M3:M1 (1) EvtRejBusySent - dispatcher responds to merge request andtoggles port role to principal initiator. M3:M1 (2) EvtTO - after mergeon other ports is done and idle time exceeds in receiver role. Porttakes over initiator role [This transition is done for principal portonly]. M3:M2 EvtTO - same as M3:M1 (2) except port is not principal.M0:M5 E_port goes OFFLINE M1:M4 If none of the above events happensM2:M4 If none of the above events happens M3:M4 If none of the aboveevents happens M4:M5 EvtOffline, E_port went offline.

FIG. 8 shows the state machine of the principal port of a mergeInitiator. The associated Tables 5 and 6 show the states and events thatcause transitions between the states.

TABLE 5 Principal Initiator States Label State Name Description IP0IPINITIALIZED Initiated as Principal Initiator E_port IP1 CHKSUMSENTSent Checksum request. IP2 CACHEDSEND Send cached merge info. IP3RRESULTRECEIVED Remote merge result received. IP4 MERGE2SENT MERGErequest sent. M6 SEGMENT Need to SEGMENT port.

TABLE 6 Principal Initiator State Transitions Transition (Start:End)Events (including conditions) IP0:IP1 Always IP1:M4 Received ACCDONEresponse for checksum request IP1:IP2 Received ACCCached response.IP1:IP3 Received ACCResult response (refer R0:R1 in Table) IP1:IP4Received ACCMerge response IP2:M4 Received ACCDone IP3:M4 Always IP4:IP3Received ACCResult response. IP4:M6 Received ACCSegment IP4:M3 ReceivedReject Busy

FIG. 9 shows the state machine of a non-principal port on an initiator.The associated Tables 7 and 8 lists the relevant states and events.

TABLE 7 Non-Principal Initiator States Label State Name Description INP0INPINITIALIZED Initiated as Non-Principal Initiator E_port

TABLE 8 Non-Principal Initiator State Transitions Transition (Start:End)Events (including conditions) INP0:M1 EvtPRINCIPAL - this event isgenerated when the current principal port goes OFFLINE and thedispatcher selects current one as the new principal. INP1:M4EvtPORTDONE - this event is generated when the principal port finishesthe merge successfully. INP1:M6 EvtSEGMENT- this event is generated whenthe principal port finishes the merge with conflicts.

FIG. 10 shows a merge receiver's state machine. The following Tables 9and 10 list the states and events.

TABLE 9 Receiver States Label State Name Description R0 RINITIATEDInitialized as receiver. R1 ACCRESULTSEND ACCResult response is sent tochecksum request (to indicate merge result is cached and the initiatorgets merge result directly). R2 ACCMERGESEND ACCMerge response tochecksum request indicates that a merge is necessary. R3 ACCCACHEDSENDACCCached response indicates that the initiator should send cachedresults. R4 ACCDONESENT ACCDone response indicates that the merge isfinished. R5 ACCSEGMENTSEND ACCSegment response indicates that the mergeresulted in a conflict.

TABLE 10 Receiver State Transition Transition (Start:End) Events(including conditions) R0:R1 Received CHECKSUM request, found remoteconfig matches local cached config. Send ACCRESULT with merge results toinitiator. R0:R2 Received CHECKSUM request, found no checksum match, amerge is needed. Sent ACCMERGESEND response to initiator. R0:R3 ReceivedCHECKSUM request, found local config matches initiator's cached config.Send ACCCACHED to initiator, which sends cached merge result. R0:R4Received CHECKSUM request, found configurations are consistent. No mergeneeded. R2:R5 Received MERGE request, the merge result is in conflict.Need to segment. Send ACCSEGMENT response to ask initiator to segmentthe port. R2:R1 Received MERGE request, merge result is success. Sendresult over to let initiator take result and install it. R3:R4 ReceivedTAKECACHED and sent ACCDONE to indicate merge is over. R4:M4 AlwaysR5:M4 Always R1:M4 Always R0:M2 Same as M3:M2 R0:M1 Same as M3:M1

Table 11 below further illustrates the benefits of implementingembodiments of the current invention. The benefits include the reductionof merge computation times, the traffic generated by the merge, themerge exchange times and the number of merge retries.

TABLE 11 Performance comparison Number of times merge Number of mergecomputing is performed exchanges initiated According to According toAccording embodiments According embodiments to prior art of current toprior art of current Scenario operation invention operation inventionTwo Switches 2 1 2 1 Join Together New switch 2 × N 1 2 × N 1 joins Nchained switches Core switch N + 1 1 2 × N 1 joins back to N switchfabric with new config New switch Up to 1 Up to 1 joins N N(N + 1)N(N + 1) switches in a full mesh fabricIn the above Table 11, for the embodiments according to the currentinvention column, it is assumed that all of the optimizations describedabove are active. It is also noted that the values in the last row arefor full payload merge exchanges.

When the Fibre Channel network contains only a few switches (i.e. N inthe above table is small), the delay and redundant operations due to themerge operation may not be significant, but once the number of switchesincreases, the deficiency will become significant quickly. As shown inthe last row of Table 11, the number of merger operations could beproportional to the second order of the number of switches in thefabric. By employing the embodiments according to the current invention,the overhead operation and delay due to the merge operation are limitedand do not increase at all when the number of switches in the networkincreases. The embodiments according to the current invention make themerge operation much more scalable. The deficiencies discovered by thecurrent invention may not be appreciable when the number of networkswitches is small or static, as in many current networks. But when thenumber increases and/or the topology of the network changes frequently,the network overhead and delay caused by such deficiencies can increasedramatically. Such increase in overhead may overwhelm the entirenetwork. By implementing the embodiments of the current invention, thosedeficiencies can be preempted. Therefore, the current invention greatlyimproves zone merge operation in a network. The current invention makesa network more robust for changes and/or expansions.

The above description of the embodiments of the current invention isfocused on switches and ports within such switches, but the invention isapplicable to any other network devices, as long as they are capable tocommunicate with other devices within the network. The device only needsto have a network interface to connect to another network device or afabric. The deviceD 108 in FIG. 5 shows the minimum necessary componentsin a network device to take advantage of the current invention. Thedevice has a control module 158 to control, manage the networkcommunication. The control module has access to a memory module 157 tostore the device related information, such as zoning configuration 159,past zone merge operations etc. When the device D 108 is connected to afabric and needs to update its zone configuration with the rest of thefabric, it can go through the procedure as described above. The device D108 may be an independent network device, or a component of a largerentity, such as a port on a switch.

The above description and examples are discussed using Fibre Channelnetworks. But the current invention is not limited to such networks. Thecurrent invention may be applied in any networks that incorporate zoningconcepts and need to update the zoning configurations when the networktopology changes. The current invention makes zoning configurationupdates very efficient and very scalable.

While illustrative embodiments of the invention have been illustratedand described, it will be appreciated that various changes can be madetherein without departing from the spirit and scope of the invention.

We claim:
 1. A method comprising: connecting a first port on a firstswitch to a second port on a second switch and forming a firstinter-switch link; connecting a third port on the first switch to afourth port on the second switch and forming a second inter-switch link;designating one inter-switch link as the principal inter-switch link andthe remaining inter-switch link as a non-principal inter-switch linkbased on a unique port property, wherein the two ports in the principalinter-switch link are the principal ports and the two ports in thenon-principal inter-switch link are the non-principal ports; and theprincipal inter-switch link performing a merge operation resulting in anupdated configuration and the non-principal inter-switch link neverperforming a merge operation.
 2. The method of claim 1, wherein theprincipal inter-switch link designation is based on the timing ofconnection and wherein the two ports connected first are the principalports and the resulting inter-switch link is the principal inter-switchlink.
 3. The method of claim 1, further comprising the two principalports sharing the updated configuration with the non-principal ports. 4.A network switch comprising: a plurality of ports, wherein at least twoports are operable to connect to at least two ports on a second switchto form at least two inter-switch links; and a control module coupled tothe plurality of ports, wherein the control module is operable toarbitrate based on a unique property of the inter-switch links todetermine one inter-switch link as a principal inter-switch-link,wherein the port in the principal inter-switch link is the principalport, and the remaining inter-switch links as non-principalinter-switch-links, wherein the ports in the non-principal inter-switchlinks are non-principal ports; and wherein the control module isoperable to perform merge operations through the principal port and tonot perform merge operations through the non-principal ports.
 5. Thenetwork switch of claim 4, wherein the principal inter-switch linkdesignation is based on the timing of connection and wherein the portconnected first is the principal port and the resulting inter-switchlink is the principal inter-switch link.
 6. The network switch of claim4, further comprising the principal port sharing an updatedconfiguration resulting from merge operations with the non-principalports.
 7. A method comprising: determining in a first network switchthat a first port is the initial port to receive an indication from asecond network switch; designating in the first network switch the firstport as a principal port; determining in the first network switch that asecond port is not the initial port to receive an indication from thesecond network switch; designating in the first network switch thesecond port as a non-principal port; and performing, by the firstnetwork, switch merge operations using the principal port and neverusing the non-principal port.
 8. The method of claim 7, wherein theindication from the second network switch is the worldwide name of thesecond switch.
 9. A network switch comprising: a control moduleconfigured to: determine that a first port is the initial port toreceive an indication from a second network switch; designate the firstport as a principal port; determine that a second port is not theinitial port to receive an indication from the second network switch;designate the second port as a non-principal port; and perform switchmerge operations using the principal port and not the non-principalport.
 10. The network switch of claim 9, wherein the indication from thesecond network switch is the worldwide name of the second switch.